{% extends 'stark/layout.html' %}

{% block css %}

<style>

    ul {
        list-style-type: none;
        padding: 0;
    }

    ul li {
        float: left;
        width: 80px;
    }

    ul li i {
        font-size: 18px;
        margin-left: 5px;
        color: #6d6565;
    }

</style>

{% endblock %}

{% block content %}

<div>
    <form class="form-horizontal" method="post" novalidate>
        {% csrf_token %}

        {% for field in my_form %}
        <div class="form-group">
            <label class="col-sm-2 control-label">{{ field.label }}</label>
            <div class="col-sm-8">
                {{ field }}
                <span style="color: red;">{{ field.errors.0 }}</span>
            </div>
        </div>
        {% endfor %}

        <div class="form-group">
            <div class="col-sm-offset-2 col-sm-8">
                <input type="submit" value="保 存" class="btn btn-primary">
            </div>
        </div>
    </form>
</div>

{% endblock %}